package kms

type DecryptReq struct {
	Keyid      string `json:"keyid"`
	Ciphertext string `json:"ciphertext"`
}

func (req *DecryptReq) action() string {
	return "Decrypt"
}

type DecryptRes struct {
	ResCommon
	Result struct {
		Plaintext string `json:"plaintext"`
	} `json:"result"`
}

func (c *Client) Decrypt(req *DecryptReq) (res DecryptRes, err error) {
	err = c.Request(req, &res)
	return
}
